package com.tianji.learning.controller;


import com.tianji.common.domain.dto.PageDTO;
import com.tianji.learning.domain.query.ReplyPageQuery;
import com.tianji.learning.domain.vo.ReplyVO;
import com.tianji.learning.service.IInteractionReplyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

/**
 * 管理端互动问题的回答或评论
 * @author 东哥
 * @since 2024-11-12
 */
@Slf4j
@RestController
@RequestMapping("/admin/replies")
@RequiredArgsConstructor
@Api(tags = "管理端互动问题的回答或评论")
public class InteractionAdminReplyController {

     private   final IInteractionReplyService iInteractionReplyService;


    /**
     * 管理端分页查询回答或评论列表
     */
     @GetMapping("page")
     @ApiOperation("管理端分页查询回答或评论列表")
     public PageDTO<ReplyVO> pageAdminList(ReplyPageQuery replyPageQuery){
         return iInteractionReplyService.pageAdminList(replyPageQuery);
     }
    /**
     * 管理端显示或隐藏评论
     */
    @PutMapping("/{id}/hidden/{hidden}")
    @ApiOperation("管理端显示或隐藏评论")
    public void showOrHide(@PathVariable Long id,@PathVariable Boolean hidden){
       iInteractionReplyService.showOrHide(id,hidden);
   }


}
